/*
 *  synchro_list.h
 */

#ifndef SYNCHRO_LIST_H
#define SYNCHRO_LIST_H

#include <list>
#include "mutex.h"

template<class T>
class SynchroList {
public:
    SynchroList();
    ~SynchroList();
    Mutex* getMutex();
    std::list<T>* getList();
private:
    Mutex mutex;
    std::list<T> l;
};

template<class T>
SynchroList<T>::SynchroList() : mutex(), l() {}

template<class T>
SynchroList<T>::~SynchroList() {}

template<class T>
Mutex* SynchroList<T>::getMutex() {
    return &mutex;
}

template<class T>
std::list<T>* SynchroList<T>::getList() {
    return &l;
}

#endif  //SYNCHRO_LIST_H

//{+}

